package com.hw.ui.login;

import com.hw.base.present.BasePresenter;

public class LoginPresent extends BasePresenter<LoginModel, LoginView> implements LoginModel.CallBack {

    public void login(String name, String pass) {
        view.showProgress();
        model.login(name, pass,this);
    }

    public void checkDelete() {
        model.checkDelete();
    }

    @Override
    public void onloginSuccess() {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.login();
    }

    @Override
    public void onFail(String str) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.showMsg(str);
    }
}


